package com.lanchetech.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 用户余额流水
 */
@ApiModel(value = "com-lanchetech-entity-BalanceFlow")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class BalanceFlow implements Serializable {
    @ApiModelProperty(value = "")
    private Long id;

    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    private Long userId;

    /**
     * 金额
     */
    @ApiModelProperty(value = "金额")
    private BigDecimal amount;

    /**
     * 交易类型
     */
    @ApiModelProperty(value = "交易类型")
    private Byte tradeType;

    /**
     * 类型 0 收入 1 支出
     */
    @ApiModelProperty(value = "类型 0 收入 1 支出")
    private Byte type;

    /**
     * 变化后的余额
     */
    @ApiModelProperty(value = "变化后的余额")
    private BigDecimal point;

    /**
     * 关联id
     */
    @ApiModelProperty(value = "关联id")
    private Long relateId;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createdAt;

    private static final long serialVersionUID = 1L;

    public static BalanceFlowBuilder builder() {
        return new BalanceFlowBuilder();
    }
}